home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Macintosh Easy Open / Documentation / Developer / Interfaces / AIncludes / StandardFile.a < prev    next >
Encoding:
Text File  |  1994-12-12  |  5.2 KB  |  230 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        StandardFile.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Built by:            anonymous
  8. ;                From:                StandardFile.i, revision 2, dated 2/25/94
  9. ;                With Interfacer:    1.1d4e2
  10. ;
  11. ;    Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  12. ;                List the version information from above in Problem Description.
  13. ;
  14. ;
  15.  
  16.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  17. __STANDARDFILE__ SET 1
  18.  
  19.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25. ;        include 'MixedMode.a'                                        ;
  26. ;            include 'Traps.a'                                        ;
  27.     ENDIF
  28.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  29.  
  30.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  31.     include 'Dialogs.a'
  32.     ENDIF
  33. ;        include 'Windows.a'                                        ;
  34. ;            include 'Quickdraw.a'                                    ;
  35. ;                include 'QuickdrawText.a'                            ;
  36. ;                    include 'IntlResources.a'                        ;
  37. ;            include 'Events.a'                                        ;
  38. ;                include 'OSUtils.a'                                ;
  39. ;            include 'Controls.a'                                    ;
  40. ;                include 'Menus.a'                                    ;
  41. ;        include 'TextEdit.a'                                        ;
  42.     ENDIF
  43.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  44.  
  45.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  46.     include 'Files.a'
  47.     ENDIF
  48. ;        include 'SegLoad.a'                                        ;
  49.     ENDIF
  50.  
  51. ; resource IDs and item offsets of pre-7.0 dialogs 
  52. putDlgID                        EQU        -3999
  53. putSave                            EQU        1
  54. putCancel                        EQU        2
  55. putEject                        EQU        5
  56. putDrive                        EQU        6
  57. putName                            EQU        7
  58. getDlgID                        EQU        -4000
  59. getOpen                            EQU        1
  60. getCancel                        EQU        3
  61. getEject                        EQU        5
  62. getDrive                        EQU        6
  63. getNmList                        EQU        7
  64. getScroll                        EQU        8
  65. ; resource IDs and item offsets of 7.0 dialogs 
  66. sfPutDialogID                    EQU        -6043
  67. sfGetDialogID                    EQU        -6042
  68. sfItemOpenButton                EQU        1
  69. sfItemCancelButton                EQU        2
  70. sfItemBalloonHelp                EQU        3
  71. sfItemVolumeUser                EQU        4
  72. sfItemEjectButton                EQU        5
  73.  
  74. sfItemDesktopButton                EQU        6
  75. sfItemFileListUser                EQU        7
  76. sfItemPopUpMenuUser                EQU        8
  77. sfItemDividerLinePict            EQU        9
  78. sfItemFileNameTextEdit            EQU        10
  79. sfItemPromptStaticText            EQU        11
  80. sfItemNewFolderUser                EQU        12
  81. ; pseudo-item hits for use in DlgHook 
  82. sfHookFirstCall                    EQU        -1
  83. sfHookCharOffset                EQU        $1000;
  84. sfHookNullEvent                    EQU        100
  85. sfHookRebuildList                EQU        101
  86. sfHookFolderPopUp                EQU        102
  87. sfHookOpenFolder                EQU        103
  88. ; the following are only in system 7.0+ 
  89. sfHookOpenAlias                    EQU        104
  90. sfHookGoToDesktop                EQU        105
  91. sfHookGoToAliasTarget            EQU        106
  92. sfHookGoToParent                EQU        107
  93. sfHookGoToNextDrive                EQU        108
  94. sfHookGoToPrevDrive                EQU        109
  95. sfHookChangeSelection            EQU        110
  96.  
  97. sfHookSetActiveOffset            EQU        200
  98. sfHookLastCall                    EQU        -2
  99.  
  100. ; the refcon field of the dialog record during a
  101. ; modalfilter or dialoghook contains one of the following 
  102.  
  103.     sfMainDialogRefCon: SET 'stdf'
  104.     sfNewFolderDialogRefCon: SET 'nfdr'
  105.     sfReplaceDialogRefCon: SET 'rplc'
  106.     sfStatWarnDialogRefCon: SET 'stat'
  107.     sfLockWarnDialogRefCon: SET 'lock'
  108.     sfErrorDialogRefCon: SET 'err '
  109. SFReply                    RECORD    0
  110. good                     ds.b    1
  111. copy                     ds.b    1
  112. fType                     ds.l    1
  113. vRefNum                     ds.w    1
  114. version                     ds.w    1
  115. fName                     ds.l    16
  116. Size                     EQU    *
  117.                         ENDR
  118.  
  119. StandardFileReply        RECORD    0
  120. sfGood                     ds.b    1
  121. sfReplacing                 ds.b    1
  122. sfType                     ds.l    1
  123. sfFile                     ds        FSSpec
  124. sfScript                 ds.w    1
  125. sfFlags                     ds.w    1
  126. sfIsFolder                 ds.b    1
  127. sfIsVolume                 ds.b    1
  128. sfReserved1                 ds.l    1
  129. sfReserved2                 ds.w    1
  130. Size                     EQU    *
  131.                         ENDR
  132.  
  133. ; the following also include an extra parameter of "your data pointer" 
  134.  
  135.     IF &TYPE('__cplusplus') = 'DEFINED' THEN
  136.     ENDIF
  137.     Macro
  138.     _SFPutFile
  139.         dc.w $3F3C
  140.         dc.w $0001
  141.         dc.w $A9EA
  142.     EndM
  143.  
  144.     Macro
  145.     _SFGetFile
  146.         dc.w $3F3C
  147.         dc.w $0002
  148.         dc.w $A9EA
  149.     EndM
  150.  
  151.     Macro
  152.     _SFPPutFile
  153.         dc.w $3F3C
  154.         dc.w $0003
  155.         dc.w $A9EA
  156.     EndM
  157.  
  158.     Macro
  159.     _SFPGetFile
  160.         dc.w $3F3C
  161.         dc.w $0004
  162.         dc.w $A9EA
  163.     EndM
  164.  
  165.     Macro
  166.     _StandardPutFile
  167.         dc.w $3F3C
  168.         dc.w $0005
  169.         dc.w $A9EA
  170.     EndM
  171.  
  172.     Macro
  173.     _StandardGetFile
  174.         dc.w $3F3C
  175.         dc.w $0006
  176.         dc.w $A9EA
  177.     EndM
  178.  
  179.     Macro
  180.     _CustomPutFile
  181.         dc.w $3F3C
  182.         dc.w $0007
  183.         dc.w $A9EA
  184.     EndM
  185.  
  186.     Macro
  187.     _CustomGetFile
  188.         dc.w $3F3C
  189.         dc.w $0008
  190.         dc.w $A9EA
  191.     EndM
  192.  
  193. ; StandardOpenDialog uses the 'open' resource ID=128 in your application for the type list 
  194.  
  195. ; It runs on all versions of sytem software since System 4.2 
  196.  
  197. ;  New StandardFile routine comments:
  198. ;  activeList is pointer to array of integer (16-bits).
  199. ;  first integer is length of list.
  200. ;  following integers are possible activatable DITL items, in
  201. ;  the order that the tab key will cycle through.  The first
  202. ;  in the list is the item made active when dialog is first shown.
  203. ;  activateProc is a pointer to a procedure like:
  204. ;   PROCEDURE MyActivateProc(theDialog:  DialogPtr;
  205. ;          itemNo:  INTEGER;
  206. ;          activating: BOOLEAN;
  207. ;          yourDataPtr: Ptr);
  208. ;  The activateProc is called with activating=FALSE on the itemNo
  209. ;  about to deactivate then with activating=TRUE on the itemNo
  210. ;  about to become the active item. (like activate event)
  211. ;  yourDataPtr is a nice little extra that makes life easier without
  212. ;  globals.  CustomGetFile & CustomPPutFile when calling any of their
  213. ;  call back procedures, pushes the extra parameter of yourDataPtr on
  214. ;  the stack.
  215. ;  In addition the filterProc in CustomGetFile & CustomPPutFile is called
  216. ;  before before SF does any mapping, instead of after.
  217. ;
  218.  
  219.     IF &TYPE('__cplusplus') = 'DEFINED' THEN
  220.     ENDIF
  221.     ENDIF ; __STANDARDFILE__
  222.